/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package cl.zeke.cursos.jsf2spring3jpa2.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 *
 * @author taller
 */
@Component
public class LinksUtil {
    
    @Value("${url.vista}")
    private String urlVista;
    
    @Value("${directorio.upload}")
    private String directorioUpload;

    public String getUrlVista() {
        return urlVista;
    }

    public void setUrlVista(String urlVista) {
        this.urlVista = urlVista;
    }
    
    public String obtenerUrlVista(String path) {
        return urlVista + path;
    }

    public String getDirectorioUpload() {
        return directorioUpload;
    }

    public void setDirectorioUpload(String directorioUpload) {
        this.directorioUpload = directorioUpload;
    }
    
    public String obtenerDirectorioUpload(String nombreArchivo){
        return directorioUpload + nombreArchivo;
    }
    
}
